<template> 
  <el-row :gutter="10">
    <el-col :span="tableName?8:24">
      <TableList ref="TableListRef" @select="onTableSelect"  @dataSourceChange="($event)=>dataSource=$event" fromType="meta"/> 
    </el-col>
    <el-col :span="tableName?16:0" v-if="tableName"> 
        <TableFieldList :multiple="true" ref="TableFieldListRef" v-model="tableName" :dataSource="dataSource"/>   
     </el-col>
  </el-row>
       
        
</template>

<script>
 import TableList from './TableList.vue';  
import TableFieldList from './TableFieldList.vue'; 
export default {
  components:{
    TableList,TableFieldList
  },
  name: 'DmMetaTableIndex',  
  computed:{ 
  },
  data() {
    return {
      tableName:'',
      dataSource:'master',
     
    }
  },
  methods: { 
    onTableSelect(tableInfo){
     
      this.tableName=tableInfo.tableName
      this.$nextTick(()=>{ 
        this.$refs['TableFieldListRef']?.doSearch();
      })
      
    }
  },
  mounted() {
  }
}

</script>

<style scoped>
</style>
